# # base  +  lmmd
# CUDA_VISIBLE_DEVICES='2' CUDA_LAUNCH_BLOCKING=1 python -u -m torch.distributed.launch \
#     --nproc_per_node=1 --master_port 11774 \
#     main.py --cfg ./configs/vssm/vmambav2_base_224.yaml \
#     --data-path ../dataset/office31 \
#     --algorithm Other --output ./output/train_output_with_lmmd_2 \
#     --dataset Office31 --source-domain amazon --target-domain dslr \
#     --pretrained ./ckpts/vssm_base_0229_ckpt_epoch_237.pth \
#     --batch-size 16 --lr 1e-4 --epochs 100 --iter-per-epoch 80 --auto-resume --save-freq 50 \
#     --transfer-loss lmmd --loss-weight 0.1

# CUDA_VISIBLE_DEVICES='2' CUDA_LAUNCH_BLOCKING=1 python -u -m torch.distributed.launch \
#     --nproc_per_node=1 --master_port 11774 \
#     main_org.py --cfg ./configs/vssm/vmambav2_base_224.yaml \
#     --data-path ../dataset/office31 \
#     --algorithm DAMamba --output ./output/train_output_with_lmmd \
#     --dataset Office31 --source-domain amazon --target-domain webcam  \
#     --pretrained ./ckpts/vssm_base_0229_ckpt_epoch_237.pth \
#     --batch-size 32 --lr 1e-4 --epochs 100 --iter-per-epoch 80 --auto-resume --save-freq 50 \
#     --transfer-loss lmmd

# CUDA_VISIBLE_DEVICES='2' CUDA_LAUNCH_BLOCKING=1 python -u -m torch.distributed.launch \
#     --nproc_per_node=1 --master_port 11774 \
#     main_org.py --cfg ./configs/vssm/vmambav2_base_224.yaml \
#     --data-path ../dataset/office31 \
#     --algorithm DAMamba --output ./output/train_output_with_lmmd \
#     --dataset Office31 --source-domain dslr --target-domain amazon  \
#     --pretrained ./ckpts/vssm_base_0229_ckpt_epoch_237.pth \
#     --batch-size 32 --lr 1e-4 --epochs 100 --iter-per-epoch 80 --auto-resume --save-freq 50 \
#     --transfer-loss lmmd

# CUDA_VISIBLE_DEVICES='2' CUDA_LAUNCH_BLOCKING=1 python -u -m torch.distributed.launch \
#     --nproc_per_node=1 --master_port 11774 \
#     main_org.py --cfg ./configs/vssm/vmambav2_base_224.yaml \
#     --data-path ../dataset/office31 \
#     --algorithm DAMamba --output ./output/train_output_with_lmmd \
#     --dataset Office31 --source-domain dslr --target-domain webcam  \
#     --pretrained ./ckpts/vssm_base_0229_ckpt_epoch_237.pth \
#     --batch-size 32 --lr 1e-4 --epochs 100 --iter-per-epoch 80 --auto-resume --save-freq 50 \
#     --transfer-loss lmmd

# CUDA_VISIBLE_DEVICES='2' CUDA_LAUNCH_BLOCKING=1 python -u -m torch.distributed.launch \
#     --nproc_per_node=1 --master_port 11774 \
#     main_org.py --cfg ./configs/vssm/vmambav2_base_224.yaml \
#     --data-path ../dataset/office31 \
#     --algorithm DAMamba --output ./output/train_output_with_lmmd \
#     --dataset Office31 --source-domain webcam --target-domain amazon  \
#     --pretrained ./ckpts/vssm_base_0229_ckpt_epoch_237.pth \
#     --batch-size 32 --lr 1e-4 --epochs 100 --iter-per-epoch 80 --auto-resume --save-freq 50 \
#     --transfer-loss lmmd

# CUDA_VISIBLE_DEVICES='2' CUDA_LAUNCH_BLOCKING=1 python -u -m torch.distributed.launch \
#     --nproc_per_node=1 --master_port 11774 \
#     main_org.py --cfg ./configs/vssm/vmambav2_base_224.yaml \
#     --data-path ../dataset/office31 \
#     --algorithm DAMamba --output ./output/train_output_with_lmmd \
#     --dataset Office31 --source-domain webcam --target-domain dslr  \
#     --pretrained ./ckpts/vssm_base_0229_ckpt_epoch_237.pth \
#     --batch-size 32 --lr 1e-4 --epochs 100 --iter-per-epoch 80 --auto-resume --save-freq 50 \
#     --transfer-loss lmmd


# # tiny + lmmd

# CUDA_VISIBLE_DEVICES='2' CUDA_LAUNCH_BLOCKING=1 python -u -m torch.distributed.launch \
#     --nproc_per_node=1 --master_port 11774 \
#     main_org.py --cfg ./configs/vssm/vmambav2_tiny_224.yaml \
#     --data-path ../dataset/office31 \
#     --algorithm DAMamba --output ./output/train_output_with_lmmd \
#     --dataset Office31 --source-domain amazon --target-domain dslr \
#     --pretrained ./ckpts/vssm_tiny_0230_ckpt_epoch_262.pth \
#     --batch-size 32 --lr 1e-4 --epochs 100 --iter-per-epoch 80 --auto-resume --save-freq 50 \
#     --transfer-loss lmmd

# CUDA_VISIBLE_DEVICES='2' CUDA_LAUNCH_BLOCKING=1 python -u -m torch.distributed.launch \
#     --nproc_per_node=1 --master_port 11774 \
#     main_org.py --cfg ./configs/vssm/vmambav2_tiny_224.yaml \
#     --data-path ../dataset/office31 \
#     --algorithm DAMamba --output ./output/train_output_with_lmmd \
#     --dataset Office31 --source-domain amazon --target-domain webcam  \
#     --pretrained ./ckpts/vssm_tiny_0230_ckpt_epoch_262.pth \
#     --batch-size 32 --lr 1e-4 --epochs 100 --iter-per-epoch 80 --auto-resume --save-freq 50 \
#     --transfer-loss lmmd

# CUDA_VISIBLE_DEVICES='2' CUDA_LAUNCH_BLOCKING=1 python -u -m torch.distributed.launch \
#     --nproc_per_node=1 --master_port 11774 \
#     main_org.py --cfg ./configs/vssm/vmambav2_tiny_224.yaml \
#     --data-path ../dataset/office31 \
#     --algorithm DAMamba --output ./output/train_output_with_lmmd \
#     --dataset Office31 --source-domain dslr --target-domain amazon  \
#     --pretrained ./ckpts/vssm_tiny_0230_ckpt_epoch_262.pth \
#     --batch-size 32 --lr 1e-4 --epochs 100 --iter-per-epoch 80 --auto-resume --save-freq 50 \
#     --transfer-loss lmmd

# CUDA_VISIBLE_DEVICES='2' CUDA_LAUNCH_BLOCKING=1 python -u -m torch.distributed.launch \
#     --nproc_per_node=1 --master_port 11774 \
#     main_org.py --cfg ./configs/vssm/vmambav2_tiny_224.yaml \
#     --data-path ../dataset/office31 \
#     --algorithm DAMamba --output ./output/train_output_with_lmmd \
#     --dataset Office31 --source-domain dslr --target-domain webcam  \
#     --pretrained ./ckpts/vssm_tiny_0230_ckpt_epoch_262.pth \
#     --batch-size 32 --lr 1e-4 --epochs 100 --iter-per-epoch 80 --auto-resume --save-freq 50 \
#     --transfer-loss lmmd

# CUDA_VISIBLE_DEVICES='2' CUDA_LAUNCH_BLOCKING=1 python -u -m torch.distributed.launch \
#     --nproc_per_node=1 --master_port 11774 \
#     main_org.py --cfg ./configs/vssm/vmambav2_tiny_224.yaml \
#     --data-path ../dataset/office31 \
#     --algorithm DAMamba --output ./output/train_output_with_lmmd \
#     --dataset Office31 --source-domain webcam --target-domain amazon  \
#     --pretrained ./ckpts/vssm_tiny_0230_ckpt_epoch_262.pth \
#     --batch-size 32 --lr 1e-4 --epochs 100 --iter-per-epoch 80 --auto-resume --save-freq 50 \
#     --transfer-loss lmmd

# CUDA_VISIBLE_DEVICES='2' CUDA_LAUNCH_BLOCKING=1 python -u -m torch.distributed.launch \
#     --nproc_per_node=1 --master_port 11774 \
#     main_org.py --cfg ./configs/vssm/vmambav2_tiny_224.yaml \
#     --data-path ../dataset/office31 \
#     --algorithm DAMamba --output ./output/train_output_with_lmmd \
#     --dataset Office31 --source-domain webcam --target-domain dslr  \
#     --pretrained ./ckpts/vssm_tiny_0230_ckpt_epoch_262.pth \
#     --batch-size 32 --lr 1e-4 --epochs 100 --iter-per-epoch 80 --auto-resume --save-freq 50 \
#     --transfer-loss lmmd

#tiny office home
# CUDA_VISIBLE_DEVICES='2' CUDA_LAUNCH_BLOCKING=1 torchrun \
#     --nproc-per-node=1 --master-port=11777 \
#     uda_main.py --cfg ./configs/vssm/vmambav2_tiny_224.yaml \
#     --data-path ../dataset/OfficeHome \
#     --algorithm DAMamba --output ./output/train_output_with_CMPLoss2 \
#     --dataset OfficeHome --source-domain Art --target-domain Clipart \
#     --pretrained ./ckpts/vssm_tiny_0230_ckpt_epoch_262.pth \
#     --batch-size 32 --lr 3e-4 --epochs 100 --iter-per-epoch 100 --auto-resume --save-freq 50 

CUDA_VISIBLE_DEVICES='2' CUDA_LAUNCH_BLOCKING=1 torchrun \
    --nproc-per-node=1 --master-port=11777 \
    uda_main.py --cfg ./configs/vssm/vmambav2_tiny_224.yaml \
    --data-path ../dataset/visda17 \
    --algorithm DAMamba --output ./output/train_output_with_CMPLoss1  \
    --dataset Visda17 --source-domain train --target-domain validation \
    --pretrained ./ckpts/vssm_tiny_0230_ckpt_epoch_262.pth \
    --batch-size 32 --lr 1e-4 --epochs 100 --iter-per-epoch 200 --auto-resume --save-freq 50 